package com.zf.zffencheng.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zf.zffencheng.dao.AdminTenantDao;
import com.zf.zffencheng.model.AdminTenant;
import com.zf.zffencheng.service.AdminTenantService;
import org.springframework.stereotype.Service;

/**
 * ClassName: AdminTenantServiceImpl <br/>
 * Description:  <br/>
 * date: 2021/5/17 13:38<br/>
 *
 * @author william <br/>
 */
@Service
public class AdminTenantServiceImpl extends ServiceImpl<AdminTenantDao, AdminTenant> implements AdminTenantService {
    /**
     * 查询管理员的寺院id
     *
     * @param id
     * @return
     */
    @Override
    public AdminTenant byAdminId(Integer id) {
        QueryWrapper<AdminTenant> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("AdminID", id);
        return getOne(queryWrapper, false);
    }
}
